package main

import (
	"fmt"
	"regexp"
)

func RegexpCase() {

	var reg = regexp.MustCompile(`^[a-z]+\[[0-9]+\]$`)
	fmt.Println("abcd : ", reg.MatchString("abcd"))

	findAlls := reg.FindAll([]byte("abcd[1234]"), -1)
	for _, match := range findAlls {
		fmt.Println("Match found: ", string(match))
	}
}
